package fatworm.metadata;

import fatworm.storage.table.*;
import fatworm.tx.Transaction;

public class MetadataMgr {
	
	private static TableMgr tblmgr;
	private static StatMgr statmgr;
	
	public MetadataMgr(boolean isnew, Transaction tx) {
		tblmgr = new TableMgr(isnew, tx);
		statmgr = new StatMgr(tblmgr, tx);
	}
	
	public void createTable(String tblname, Schema sch, Transaction tx) {
		tblmgr.createTable(tblname, sch, tx);
	}
	
	public TableInfo getTableInfo(String tblname, Transaction tx) {
		return tblmgr.getTableInfo(tblname, tx);
	}
	
	public StatInfo getStatInfo(String tblname, TableInfo ti, Transaction tx) {
		return statmgr.getStatInfo(tblname, ti, tx);
	}
	
}